import { createRouter, createWebHashHistory,createWebHistory, RouteRecordRaw } from 'vue-router';
const constantRoutes = [
  {
    path: '/parameter',
    name: 'parameter',
    component: () => import('@/components/task/parameter.vue'),
  },
  {
    path: '/data',
    name: 'data',
    component: () => import('@/components/task/data.vue'),
  },
  {
    path: '/calibration',
    name: 'calibration',
    component: () => import('@/components/task/calibration.vue'),
  },
  // {
  //   path: '/sensor',
  //   name: 'sensor',
  //   component: () => import('@/components/task/sensor.vue'),
  // },
  {
    path: '/',
    redirect: '/parameter'
  },
];
// 创建路由
const router = createRouter({
  history: createWebHistory("/"), //alatan/geopro
  // hash
  routes: constantRoutes ,
  // 刷新时，滚动条位置还原
  scrollBehavior: () => ({ left: 0, top: 0 })
});
export default router;
